import React from 'react';
import data from '../TestData.json'
import { connect } from 'dva';

import styles from './HomePage.scss'

const HomePage = ({title}) => {
    return (
        <div className={styles.root}>
            <div className={styles.rootTitle}>{title}</div>
            {data.greeter.text}
            <div className={styles.foot}>aaa</div>
        </div>
    )
};

const mapStateToProps = ({home}) => {
    console.log('state...',home)
    return home;
};

// propTypes属性，用于限制props的传入数据类型
// HomePage.propTypes = {
//     title: PropTypes.string,
// };

export default connect(mapStateToProps)(HomePage);
